<template>
	<view class="order-apply-info">
		<view class="flex-between-center">
			<view class="">申请人</view>
			<view class="fw-b">{{info.name}}/{{info.phone}}</view>
		</view>
		<view class="flex-between-center">
			<view class="">申请时间</view>
			<view class="fw-b">{{info.applyTime || '-'}}</view>
		</view>
		<view class="flex-between-center">
			<view class="">申请金额</view>
			<view class="fw-b">{{info.applyAmount || '-'}}</view>
		</view>
		<view class="flex-between-center">
			<view class="">借款期限</view>
			<view class="fw-b">{{$common.selectDictLabel(dayOptions,info.applyTotalDay) || '-'}}</view>
		</view>
		<view class="flex-between-center">
			<view class="">还款周期</view>
			<view class="fw-b">{{$common.selectDictLabel(termOptions,info.applyTotalTerm) || '-'}}</view>
		</view>
		<view class="flex-between-center">
			<view class="">还款方式</view>
			<view class="fw-b">{{$common.selectDictLabel(methodOptions,info.repayMethod) || '-'}}</view>
		</view>
		<view class="flex-between-center">
			<view class="">借款用途</view>
			<view class="fw-b">{{$common.selectDictLabel(purposeOptions,info.loanPurpose) || '-'}}</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				purposeOptions:[],
				methodOptions:[],
				termOptions:[],
				dayOptions:[],
				info: {}
			}
		},
		onLoad(e) {
			this.orderId = e.orderId
			this.getOrderInfo()
			this.getDicts()
		},
		methods: {
			getOrderInfo(){
				this.$request({
					url: '/orderInfo/getDetail',
					method: 'get',
					data:{id:this.orderId}
				}).then(res => {
					this.info = res.data
				})
			},
			getDicts(){
				this.$request({
					url: '/system/dict/data/type/loan_purpose',
					method: 'get'
				}).then(res => {
					this.purposeOptions = res.data;
				})
				this.$request({
					url: '/system/dict/data/type/repayment_method',
					method: 'get'
				}).then(res => {
					this.methodOptions = res.data;
				})
				this.$request({
					url: '/system/dict/data/type/repayment_term',
					method: 'get'
				}).then(res => {
					this.termOptions = res.data;
				})
				this.$request({
					url: '/system/dict/data/type/loan_days',
					method: 'get'
				}).then(res => {
					this.dayOptions = res.data;
				})
			},
		}
	}
</script>
<style>
	page{
		background-color: #fff;
	}
</style>
<style lang="scss" scoped>
	.order-apply-info {
		padding: 0 24rpx;
		>view{
			height: 124rpx;
			&:not(:last-child){
				border-bottom: 2rpx solid #F5F5F5;
			}
		}
	}
</style>
